package com.xlcszsgc.core.util;

/*******************************************************************************
 * @file: HtmlEncode.java
 * @project: uum
 * @date: 2007-11-8
 * @author wangwei
 * @description:
 ******************************************************************************/
public class HtmlEncode {

	public static String encode(String str) {
		String s = str.replaceAll("<", "&lt;");
		s = s.replaceAll(">", "&gt;");
		s = s.replaceAll("\n", "<br>");
		s = s.replaceAll(" ", "&nbsp;");
		s = s.replaceAll("'", "&#39");
		return s;
	}

}
